<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>国科环宇--系统登陆</title>
<link rel="shortcut icon" type="image/x-icon" th:href="@{/resource/icon/favicon.ico}" />
<link rel="stylesheet" type="text/css" th:href="@{/resource/css/login.css}" />
<script type="text/javascript" th:src = "@{/resource/js/jquery-3.2.1.min.js}"></script>
</head>
<script type="text/javascript">
	function getBasePath(url){
		return (window.location.origin)+"/"+url;
	}
	$(function(){
		$("#register").click(function(){
			$.ajax({
				url:getBasePath("register"),
				//url:"/register",
				type:'POST',
				contentType:"application/json;charset=utf-8",
				data:{name:'zhangsan',age:10},
				success:function(data){
					console.log("data:"+data)
				}
			});
		});
	});
</script>
<body>
	<div class='page'>
		<div class="loginForm">
			<form action="" id='loginForm'>
				<span class='formTitle'>用户登录</span>
				<div class='form-item'>
					<label>账号：</label><input type="text"  placeholder="请输入个人账号" name='userCode'/>
				</div>
				<div class='form-item'>
					<label>密码：</label><input type="password" placeholder="请输入个人密码" name='userPassword'/>
				</div>
				<div class='checkbox'>
					<input type="checkbox" checked="checked" name='weeklogin'/>七天免登录
				</div>
				<div>
					<a th:href='@{/index}' class='loginBtn' onclick="login()">登录</a>
				</div>
				<div class='zhuceBtn'>
					没有账号？<a id = 'register' href="#">立即注册！</a>
				</div>
			</form>
			<div class='other-login-list'>
				<div class='other-login'>
					<a href="#">
						<img class='other-login-img' title="微信登录" alt="微信登录" th:src="@{/resource/icon/wechat.png}"/>
					</a>
				</div>
				<div class='other-login'>
					<a href="#">
						<img class='other-login-img' title="微博登录" alt="微博登录" th:src="@{/resource/icon/weibo.png}"/>
					</a>
				</div>
				<div class='other-login'>
					<a href="#">
						<img class='other-login-img' title="QQ登录" alt="QQ登录" th:src="@{/resource/icon/qq.png}"/>
					</a>
				</div>
			</div>
		</div>
	</div>
</body>
<script type="text/javascript">

</script>
</html>